package com.ityedao.案例;

import java.io.File;

public class Test {
    public static void main(String[] args) {
        File dir = new File("D:\\A-Resource");

        File[] videos = dir.listFiles();

        for (File video : videos) {
            String name = video.getName();
            String index = name.substring(0, name.indexOf("、"));
            String lastName = name.substring(name.indexOf("、"));
            String newName = (Integer.valueOf(index) + 18) + lastName;

            video.renameTo(new File(dir, newName));
        }
    }
}
